/*
 * MainJFrame.java
 *
 * Created on 15 aprile 2008, 20.16
 */

package it.allerj.gui;

import com.toedter.calendar.JTextFieldDateEditor;
import gr.zeus.tests.JTableSupport;
import gr.zeus.ui.table.TableSorter;
import it.allerj.bean.PatientFilter;
import it.allerj.demo.DemoConfiguratorMatrix;
import it.allerj.gui.action.FactoryGuiActionProxy;
import it.allerj.gui.action.GuiAction;
import it.allerj.gui.action.GuiActionInterface;
import it.allerj.gui.css.CSS;
import it.allerj.gui.support.AllergicTestFactory;
import it.allerj.model.AllergicTest;
import it.allerj.model.AllergicTestDoubleFrame;
import it.allerj.model.AllergicTestSingleFrame;
import it.allerj.model.Patient;
import it.allerj.model.PersistedMatrix;
import it.allerj.task.ScanFrameTask;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.event.ActionEvent;
import java.util.Locale;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import java.awt.image.BufferedImage;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JComponent;
import javax.swing.JTabbedPane;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author  Alessandro Veracchi
 */
public class MainJFrame extends javax.swing.JFrame {
    private GuiActionInterface guiAction =  FactoryGuiActionProxy.standardGuiAction;
    //private int repeatNTime = 1; //from 1 to --
    public JPanel analysisStep2;
    private AllergicTest allergicTest;
    private BufferedImage image;
    private BufferedImage image2;
    private int numberFrame= 1;
    public static final Object[] defaultOptions = {java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.Yes"), java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.Cancel")};
    public static final Object[] yesNotOptions = {java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.Yes"), java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.No")};

    /** Creates new form MainJFrame */
    public MainJFrame() {
        super(java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("Allerj"));
        //Force SwingApp to come up in the System L&F
        String lookAndFeel = UIManager.getSystemLookAndFeelClassName();
       
        JComponent.setDefaultLocale(Locale.ENGLISH);
        try {
            UIManager.setLookAndFeel(lookAndFeel);
        } catch (UnsupportedLookAndFeelException exc) {
            System.err.println(java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("Warning:_UnsupportedLookAndFeel:_") + lookAndFeel);
        }
        catch (Exception exc) {
            System.err.println(java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("Error_loading_") + lookAndFeel + java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString(":_") + exc);
        }
       
        // fill persisted matrixes if empty
        PersistedMatrix f = new PersistedMatrix(9,9/*num of rows*/);       
        if (guiAction.getPersistenceObjectList(f.getClass()).size() == 0) {
            DemoConfiguratorMatrix.configMatrix(guiAction);
        }

        this.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
        
        
        initComponents();
        radioSelectPatient.setEnabled(guiAction.getPersistenceObjectList(Patient.class).size()!=0);
        this.setMinimumSize(new Dimension(800,600));

    }

    public void bindingAllergicTestToshowPanel(AllergicTest allergicTest) {
        modelPatient = allergicTest.getPatient();
        outNamePatient.setText(modelPatient.getName()+" "+modelPatient.getSurname());
        


        outTelephonePatient.setText(modelPatient.getTelephone());
        outMobilePatient.setText(modelPatient.getMobile());
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MMM-yyyy",Locale.ENGLISH);

        dataATLabel.setText(simpleDateFormat.format(allergicTest.getDate()));
        outBarcodeAT.setText(allergicTest.getReagentBarcode());
        jLabel1.setText(allergicTest.getFrameList().get(0).getBarcode());
        jLabel2.setText("");
        jTable1 = new it.allerj.gui.component.MyTable();
        String[] COLUMN_TEST_RESULTS = JTableSupport.getFrameColumn();
        DefaultTableModel tableModelTests = JTableSupport.getNewTableModelForTests(COLUMN_TEST_RESULTS);
        jTable1.setModel(tableModelTests);
        

        if(allergicTest.getFrameList().get(0).getAllergicElementList()==null | allergicTest.getFrameList().get(0).getAllergicElementList().size()==0){
            noResult.setText(CSS.rs.getString("i18n.no.result.at"));
        } else {
            noResult.setText("");
            //patientResultTable = null;
            
            TableSorter tableSorter = JTableSupport.getNewTableSorter(tableModelTests, jTable1);
            jTable1.setModel(tableSorter);
            JTableSupport.getNewResizer(tableModelTests, jTable1);
            Object[][] values = JTableSupport.getTestData(allergicTest.getFrameList().get(0).getAllergicElementList());
            tableModelTests.setDataVector(values, COLUMN_TEST_RESULTS);
            
        }
        jScrollPane3.setViewportView(jTable1);
        
        jTable2 = new it.allerj.gui.component.MyTable();
        String[] COLUMN_TEST_RESULTS2 = JTableSupport.getFrameColumn();
        DefaultTableModel tableModelTests2 = JTableSupport.getNewTableModelForTests(COLUMN_TEST_RESULTS2);
        jTable2.setModel(tableModelTests2);
        if(allergicTest instanceof AllergicTestDoubleFrame){
             jLabel2.setText(allergicTest.getFrameList().get(1).getBarcode());
            if(allergicTest.getFrameList().get(1).getAllergicElementList()==null | allergicTest.getFrameList().get(1).getAllergicElementList().size()==0){
                noResult.setText(CSS.rs.getString("i18n.no.result.at"));
            } else {
                noResult.setText("");

                TableSorter tableSorter2 = JTableSupport.getNewTableSorter(tableModelTests2, jTable2);
                jTable2.setModel(tableSorter2);
                JTableSupport.getNewResizer(tableModelTests2, jTable2);
                Object[][] values = JTableSupport.getTestData(allergicTest.getFrameList().get(1).getAllergicElementList());
                tableModelTests2.setDataVector(values, COLUMN_TEST_RESULTS2);

            }
        }
        jScrollPane4.setViewportView(jTable2);
        
        
        if(modelPatient.getAllergicTestSet()==null || modelPatient.getAllergicTestSet().size()==0){
            noResult.setText(java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.no.result.at"));
        }
        //throw1 new UnsupportedOperationException("Not yet implemented");

    }
    
    
    private void bindingToPatient() {
        modelPatient.setName(namePatient.getText());
        modelPatient.setSurname(surnamePatient.getText());
        modelPatient.setBirthDate(birthdatePatient.getDate());
        modelPatient.setMale(maleRadioButton.isSelected());
        modelPatient.setTelephone(telPatient.getText());
        modelPatient.setMobile(mobilePatient.getText());
        modelPatient.setEmail(emailPatient.getText());
        //throw1 new UnsupportedOperationException("Not yet implemented");
    }
    
    public void bindingPatientToEditPanel() {
        namePatient.setText(modelPatient.getName(), true);
        
        surnamePatient.setText(modelPatient.getSurname(), true);
        birthdatePatient.setDate(modelPatient.getBirthDate());
        telPatient.setText(modelPatient.getTelephone(), true);
        mobilePatient.setText(modelPatient.getMobile(), true);
        emailPatient.setText(modelPatient.getEmail(), true);
        maleRadioButton.setSelected(modelPatient.isMale());
        femaleRadioButton.setSelected(!modelPatient.isMale());
        
        if(modelPatient.getAllergicTestSet()==null || modelPatient.getAllergicTestSet().size()==0){
            noResult.setText(java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.no.result.at"));
        }
        //throw1 new UnsupportedOperationException("Not yet implemented");
    }
    public void cleanModel(){
        modelPatient = new Patient();
        bindingPatientToEditPanel();
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        modelPatient = new it.allerj.model.Patient();
        patientFilter = new it.allerj.bean.PatientFilter();
        allergicTestFilter = new it.allerj.bean.AllergicTestFilter();
        modelAllergicTest = new it.allerj.model.AllergicTest();
        buttonGroupSelectAnalysisType = new javax.swing.ButtonGroup();
        buttonGroupSelectPatient = new javax.swing.ButtonGroup();
        buttonGroupSexPatient = new javax.swing.ButtonGroup();
        welcomeAnalysis = new javax.swing.JPanel();
        welcomeHead = new javax.swing.JPanel();
        titleWelcome = new javax.swing.JLabel();
        welcomeBody = new javax.swing.JPanel();
        wizardButtonBar = new javax.swing.JPanel();
        jSeparator = new javax.swing.JSeparator();
        innerButtonBar = new javax.swing.JPanel();
        exit = new javax.swing.JButton();
        forward = new javax.swing.JButton();
        analysisStep1 = new javax.swing.JPanel();
        analysisStep1Head = new javax.swing.JPanel();
        titleStep1 = new javax.swing.JLabel();
        analysisStep1Body = new javax.swing.JPanel();
        decisionStep1 = new javax.swing.JLabel();
        radioInsertPatient = new javax.swing.JRadioButton();
        radioSelectPatient = new javax.swing.JRadioButton();
        spacer1 = new javax.swing.JPanel();
        spacer4 = new javax.swing.JPanel();
        wizardButtonBar1 = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();
        innerButtonBar1 = new javax.swing.JPanel();
        back1 = new javax.swing.JButton();
        forward1 = new javax.swing.JButton();
        analysisStep2InsertPatient = new javax.swing.JPanel();
        analysisStep2Head = new javax.swing.JPanel();
        titleStep32 = new javax.swing.JLabel();
        analysisStep2Body = new javax.swing.JPanel();
        analysisStep2Form = new javax.swing.JPanel();
        namePatientLabel = new javax.swing.JLabel();
        namePatient = new it.allerj.gui.component.TextOnly();
        surnamePatientLabel = new javax.swing.JLabel();
        surnamePatient = new it.allerj.gui.component.TextOnly();
        sexPatientLabel = new javax.swing.JLabel();
        sexPanel = new javax.swing.JPanel();
        maleRadioButton = new javax.swing.JRadioButton();
        femaleRadioButton = new javax.swing.JRadioButton();
        birthdatePatientLabel = new javax.swing.JLabel();
        birthdatePatient = new com.toedter.calendar.JDateChooser();
        telPatientLabel = new javax.swing.JLabel();
        telPatient = new it.allerj.gui.component.NumberOnly();
        mobilePatientLabel = new javax.swing.JLabel();
        mobilePatient = new it.allerj.gui.component.NumberOnly();
        emailPatientLabel = new javax.swing.JLabel();
        emailPatient = new it.allerj.gui.component.EmailOnly();
        messageLabelName = new com.openoak.textfield.MessageLabel();
        messageLabelSurname = new com.openoak.textfield.MessageLabel();
        messageLabelEmail = new com.openoak.textfield.MessageLabel();
        messageLabelTel = new com.openoak.textfield.MessageLabel();
        messageLabelMobile = new com.openoak.textfield.MessageLabel();
        spacer3 = new javax.swing.JPanel();
        errorPane = new javax.swing.JPanel();
        mandatoryRequirements = new com.openoak.textfield.MessageLabel();
        wizardButtonBar2 = new javax.swing.JPanel();
        jSeparator2 = new javax.swing.JSeparator();
        innerButtonBar2 = new javax.swing.JPanel();
        back2 = new javax.swing.JButton();
        forward2 = new javax.swing.JButton();
        analysisStep3 = new javax.swing.JPanel();
        analysisStep3Head = new javax.swing.JPanel();
        titleStep3 = new javax.swing.JLabel();
        analysisStep3Body = new javax.swing.JPanel();
        decisionStep3 = new javax.swing.JLabel();
        spacer = new javax.swing.JPanel();
        radioSingleFrame = new javax.swing.JRadioButton();
        radioDoubleFrame = new javax.swing.JRadioButton();
        spacer5 = new javax.swing.JPanel();
        wizardButtonBar3 = new javax.swing.JPanel();
        jSeparator3 = new javax.swing.JSeparator();
        innerButtonBar3 = new javax.swing.JPanel();
        back3 = new javax.swing.JButton();
        forward3 = new javax.swing.JButton();
        analysisStep4 = new javax.swing.JPanel();
        analysisStep4Head = new javax.swing.JPanel();
        titleStep4 = new javax.swing.JLabel();
        analysisStep4Body = new javax.swing.JPanel();
        spacer6 = new javax.swing.JPanel();
        resultReagentScan = new javax.swing.JLabel();
        wizardButtonBar4 = new javax.swing.JPanel();
        jSeparator4 = new javax.swing.JSeparator();
        innerButtonBar4 = new javax.swing.JPanel();
        back4 = new javax.swing.JButton();
        forward4 = new javax.swing.JButton();
        analysisStep5 = new javax.swing.JPanel();
        analysisStep5Head = new javax.swing.JPanel();
        titleStep5 = new javax.swing.JLabel();
        analysisStep5Body = new javax.swing.JPanel();
        spacer7 = new javax.swing.JPanel();
        resultFrameBarcodeScan = new javax.swing.JLabel();
        wizardButtonBar5 = new javax.swing.JPanel();
        jSeparator5 = new javax.swing.JSeparator();
        innerButtonBar5 = new javax.swing.JPanel();
        back5 = new javax.swing.JButton();
        forward5 = new javax.swing.JButton();
        analysisStep6 = new javax.swing.JPanel();
        analysisStep6Head = new javax.swing.JPanel();
        titleStep6 = new javax.swing.JLabel();
        analysisStep6Body = new javax.swing.JPanel();
        descriptionPanel = new javax.swing.JPanel();
        descriptionLabelScanFrame1 = new javax.swing.JLabel();
        descriptionLabelScanFrame2 = new javax.swing.JLabel();
        spacer8 = new javax.swing.JPanel();
        resultFrameScan = new javax.swing.JLabel();
        frameScanButton = new javax.swing.JButton();
        wizardButtonBar6 = new javax.swing.JPanel();
        jSeparator6 = new javax.swing.JSeparator();
        innerButtonBar6 = new javax.swing.JPanel();
        back6 = new javax.swing.JButton();
        forward6 = new javax.swing.JButton();
        searchPatientPanel = new javax.swing.JPanel();
        searchPanel = new javax.swing.JPanel();
        searchPatientPanelLabel = new javax.swing.JLabel();
        filterPanel = new javax.swing.JPanel();
        searchBodyPanel = new javax.swing.JPanel();
        namePatientSearchLabel = new javax.swing.JLabel();
        namePatientSearch = new javax.swing.JTextField();
        surnamePatientSearchLabel = new javax.swing.JLabel();
        surnamePatientSearch = new javax.swing.JTextField();
        wizardButtonBar7 = new javax.swing.JPanel();
        jSeparator7 = new javax.swing.JSeparator();
        innerButtonBar7 = new javax.swing.JPanel();
        back9 = new javax.swing.JButton();
        reset = new javax.swing.JButton();
        searchPatient = new javax.swing.JButton();
        dataTablePanel = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        patientResultTable = new it.allerj.gui.component.MyTable();
        noPatientResult = new javax.swing.JLabel();
        editPatient = new javax.swing.JPanel();
        analysisStep2Head1 = new javax.swing.JPanel();
        titleStep33 = new javax.swing.JLabel();
        innerEditPatient = new javax.swing.JPanel();
        wizardButtonBar8 = new javax.swing.JPanel();
        jSeparator8 = new javax.swing.JSeparator();
        innerButtonBar8 = new javax.swing.JPanel();
        back7 = new javax.swing.JButton();
        deletePatient = new javax.swing.JButton();
        savePatient = new javax.swing.JButton();
        dataTablePanel1 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        resultTable = new it.allerj.gui.component.MyTable();
        noResult = new javax.swing.JLabel();
        searchResultPanel = new javax.swing.JPanel();
        searchResult = new javax.swing.JPanel();
        searchResultPanelLabel = new javax.swing.JLabel();
        filterResultPanel = new javax.swing.JPanel();
        searchBodyPanel1 = new javax.swing.JPanel();
        barCodeReagentSearchLabel = new javax.swing.JLabel();
        barCodeReagentSearch = new javax.swing.JTextField();
        singleFrameLabel = new javax.swing.JLabel();
        typeFrame = new javax.swing.JPanel();
        singleFrameCheck = new javax.swing.JCheckBox();
        doubleFrameCheck = new javax.swing.JCheckBox();
        fromDateLabel = new javax.swing.JLabel();
        fromDate = new com.toedter.calendar.JDateChooser();
        jComboBox1 = new javax.swing.JComboBox();
        toDateLabel = new javax.swing.JLabel();
        toDate = new com.toedter.calendar.JDateChooser();
        jComboBox2 = new javax.swing.JComboBox();
        wizardButtonBar9 = new javax.swing.JPanel();
        jSeparator9 = new javax.swing.JSeparator();
        innerButtonBar9 = new javax.swing.JPanel();
        reset1 = new javax.swing.JButton();
        searchFrame = new javax.swing.JButton();
        showResultPanel = new javax.swing.JPanel();
        analysisStep2Head2 = new javax.swing.JPanel();
        titleStep34 = new javax.swing.JLabel();
        innerShowResult = new javax.swing.JPanel();
        detailPatient = new javax.swing.JPanel();
        patientLabel = new javax.swing.JLabel();
        outNamePatient = new javax.swing.JLabel();
        outSurnamePatient = new javax.swing.JLabel();
        outBithdatePatient = new javax.swing.JLabel();
        outTelephonePatient = new javax.swing.JLabel();
        outMobilePatient = new javax.swing.JLabel();
        outEmailPatient = new javax.swing.JLabel();
        telLabel = new javax.swing.JLabel();
        mobLabel = new javax.swing.JLabel();
        dataATLabel = new javax.swing.JLabel();
        outDataAT = new javax.swing.JLabel();
        barcodeATlabel = new javax.swing.JLabel();
        outBarcodeAT = new javax.swing.JLabel();
        frame1Barcode = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        frame2Barcode = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        wizardButtonBar10 = new javax.swing.JPanel();
        jSeparator10 = new javax.swing.JSeparator();
        innerButtonBar10 = new javax.swing.JPanel();
        back8 = new javax.swing.JButton();
        deletePatient1 = new javax.swing.JButton();
        contentPane = new javax.swing.JPanel();
        headPanel = new javax.swing.JPanel();
        putHereImage = new javax.swing.JLabel();
        allerJTitle = new javax.swing.JLabel();
        jTabbedPane = new javax.swing.JTabbedPane();
        analysisPane = new javax.swing.JPanel();
        patientPane = new javax.swing.JPanel();
        resultPane = new javax.swing.JPanel();
        footerPane = new javax.swing.JPanel();

        buttonGroupSelectAnalysisType.add(radioSingleFrame);
        buttonGroupSelectAnalysisType.add(radioDoubleFrame);

        buttonGroupSelectPatient.add(radioInsertPatient);
        buttonGroupSelectPatient.add(radioSelectPatient);

        buttonGroupSexPatient.add(maleRadioButton);
        buttonGroupSexPatient.add(femaleRadioButton);

        welcomeAnalysis.setMinimumSize(new java.awt.Dimension(500, 500));
        welcomeAnalysis.setPreferredSize(new java.awt.Dimension(500, 500));
        welcomeAnalysis.setLayout(new java.awt.BorderLayout());

        welcomeHead.setMinimumSize(new java.awt.Dimension(207, 35));
        welcomeHead.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        titleWelcome.setFont(CSS.h1);
        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj"); // NOI18N
        titleWelcome.setText(bundle.getString("i18n.welcome.to.analysis")); // NOI18N
        welcomeHead.add(titleWelcome);

        welcomeAnalysis.add(welcomeHead, java.awt.BorderLayout.PAGE_START);

        javax.swing.GroupLayout welcomeBodyLayout = new javax.swing.GroupLayout(welcomeBody);
        welcomeBody.setLayout(welcomeBodyLayout);
        welcomeBodyLayout.setHorizontalGroup(
            welcomeBodyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 500, Short.MAX_VALUE)
        );
        welcomeBodyLayout.setVerticalGroup(
            welcomeBodyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 437, Short.MAX_VALUE)
        );

        welcomeAnalysis.add(welcomeBody, java.awt.BorderLayout.CENTER);

        wizardButtonBar.setLayout(new java.awt.BorderLayout());
        wizardButtonBar.add(jSeparator, java.awt.BorderLayout.PAGE_START);

        innerButtonBar.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        exit.setText(bundle.getString("i18n.exit")); // NOI18N
        exit.setEnabled(false);
        exit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitActionPerformed(evt);
            }
        });
        innerButtonBar.add(exit);

        forward.setText(bundle.getString("i18n.forward")); // NOI18N
        forward.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                forwardActionPerformed(evt);
            }
        });
        innerButtonBar.add(forward);

        wizardButtonBar.add(innerButtonBar, java.awt.BorderLayout.CENTER);

        welcomeAnalysis.add(wizardButtonBar, java.awt.BorderLayout.PAGE_END);

        analysisStep1.setMinimumSize(new java.awt.Dimension(500, 500));
        analysisStep1.setPreferredSize(new java.awt.Dimension(500, 500));
        analysisStep1.setLayout(new java.awt.BorderLayout());
        forward1.setEnabled(false);

        analysisStep1Head.setMinimumSize(new java.awt.Dimension(207, 35));
        analysisStep1Head.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        titleStep1.setFont(CSS.h1);
        titleStep1.setText(bundle.getString("i18n.select.patient")); // NOI18N
        analysisStep1Head.add(titleStep1);

        analysisStep1.add(analysisStep1Head, java.awt.BorderLayout.PAGE_START);

        analysisStep1Body.setMinimumSize(new java.awt.Dimension(100, 100));
        analysisStep1Body.setLayout(new java.awt.GridBagLayout());

        decisionStep1.setFont(CSS.h3);
        decisionStep1.setText(bundle.getString("i18n.select.analysis.type")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        analysisStep1Body.add(decisionStep1, gridBagConstraints);

        radioInsertPatient.setFont(CSS.h3);
        radioInsertPatient.setText(bundle.getString("i18n.insert.new.patient")); // NOI18N
        radioInsertPatient.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioInsertPatientActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        analysisStep1Body.add(radioInsertPatient, gridBagConstraints);

        radioSelectPatient.setFont(CSS.h3);
        radioSelectPatient.setText(bundle.getString("i18n.search.old.patient")); // NOI18N
        radioSelectPatient.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioSelectPatientActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        analysisStep1Body.add(radioSelectPatient, gridBagConstraints);

        spacer1.setMinimumSize(new java.awt.Dimension(50, 10));
        spacer1.setPreferredSize(new java.awt.Dimension(50, 10));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        analysisStep1Body.add(spacer1, gridBagConstraints);

        spacer4.setLayout(new javax.swing.BoxLayout(spacer4, javax.swing.BoxLayout.LINE_AXIS));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
        analysisStep1Body.add(spacer4, gridBagConstraints);

        analysisStep1.add(analysisStep1Body, java.awt.BorderLayout.CENTER);

        wizardButtonBar1.setLayout(new java.awt.BorderLayout());
        wizardButtonBar1.add(jSeparator1, java.awt.BorderLayout.PAGE_START);

        innerButtonBar1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        back1.setText(bundle.getString("i18n.back")); // NOI18N
        back1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                back1ActionPerformed(evt);
            }
        });
        innerButtonBar1.add(back1);

        forward1.setText(bundle.getString("i18n.forward")); // NOI18N
        forward1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                forward1ActionPerformed(evt);
            }
        });
        innerButtonBar1.add(forward1);

        wizardButtonBar1.add(innerButtonBar1, java.awt.BorderLayout.CENTER);

        analysisStep1.add(wizardButtonBar1, java.awt.BorderLayout.PAGE_END);

        analysisStep2InsertPatient.setMinimumSize(new java.awt.Dimension(500, 500));
        analysisStep2InsertPatient.setPreferredSize(new java.awt.Dimension(500, 500));
        analysisStep2InsertPatient.setLayout(new java.awt.BorderLayout());
        forward1.setEnabled(false);

        analysisStep2Head.setMinimumSize(new java.awt.Dimension(207, 35));
        analysisStep2Head.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        titleStep32.setFont(CSS.h1);
        titleStep32.setText(bundle.getString("i18n.insert.new.patient")); // NOI18N
        analysisStep2Head.add(titleStep32);

        analysisStep2InsertPatient.add(analysisStep2Head, java.awt.BorderLayout.PAGE_START);

        analysisStep2Body.setLayout(new java.awt.BorderLayout());

        analysisStep2Form.setMinimumSize(new java.awt.Dimension(100, 100));
        analysisStep2Form.setLayout(new java.awt.GridBagLayout());

        namePatientLabel.setFont(CSS.h3);
        namePatientLabel.setText(bundle.getString("i18n.name.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        analysisStep2Form.add(namePatientLabel, gridBagConstraints);

        namePatient.setColumns(CSS.columnsTextField);
        namePatient.setFont(CSS.h3);
        namePatient.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                namePatientCaretUpdate(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(namePatient, gridBagConstraints);
        namePatient.attachMessageLabel(messageLabelName);
        namePatient.setRequired(true);

        surnamePatientLabel.setFont(CSS.h3);
        surnamePatientLabel.setText(bundle.getString("i18n.surname.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        analysisStep2Form.add(surnamePatientLabel, gridBagConstraints);

        surnamePatient.setColumns(CSS.columnsTextField);
        surnamePatient.setFont(CSS.h3);
        surnamePatient.addCaretListener(new javax.swing.event.CaretListener() {
            public void caretUpdate(javax.swing.event.CaretEvent evt) {
                surnamePatientCaretUpdate(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(surnamePatient, gridBagConstraints);
        surnamePatient.attachMessageLabel(messageLabelSurname);
        surnamePatient.setRequired(true);

        sexPatientLabel.setFont(CSS.h3);
        sexPatientLabel.setText(bundle.getString("i18n.sex.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        analysisStep2Form.add(sexPatientLabel, gridBagConstraints);

        sexPanel.setLayout(new java.awt.GridLayout(1, 2));

        maleRadioButton.setFont(CSS.h3);
        maleRadioButton.setSelected(true);
        maleRadioButton.setText(bundle.getString("i18n.male")); // NOI18N
        sexPanel.add(maleRadioButton);

        femaleRadioButton.setFont(CSS.h3);
        femaleRadioButton.setText(bundle.getString("i18n.female")); // NOI18N
        sexPanel.add(femaleRadioButton);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        analysisStep2Form.add(sexPanel, gridBagConstraints);

        birthdatePatientLabel.setFont(CSS.h3);
        birthdatePatientLabel.setText(bundle.getString("i18n.birthdate.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        analysisStep2Form.add(birthdatePatientLabel, gridBagConstraints);

        birthdatePatient.setLocale(Locale.ENGLISH);
        birthdatePatient.setDateFormatString("dd/MM/yyyy");
        birthdatePatient.setFont(CSS.h3);
        birthdatePatient.setMinimumSize(new java.awt.Dimension(27, 30));
        birthdatePatient.setPreferredSize(new java.awt.Dimension(137, 30));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(birthdatePatient, gridBagConstraints);

        telPatientLabel.setFont(CSS.h3);
        telPatientLabel.setText(bundle.getString("i18n.tel.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        analysisStep2Form.add(telPatientLabel, gridBagConstraints);

        telPatient.setColumns(CSS.columnsTextField);
        telPatient.setFont(CSS.h3);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(telPatient, gridBagConstraints);
        telPatient.attachMessageLabel(messageLabelTel);

        mobilePatientLabel.setFont(CSS.h3);
        mobilePatientLabel.setText(bundle.getString("i18n.mobile.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        analysisStep2Form.add(mobilePatientLabel, gridBagConstraints);

        mobilePatient.setColumns(CSS.columnsTextField);
        mobilePatient.setFont(CSS.h3);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(mobilePatient, gridBagConstraints);
        mobilePatient.attachMessageLabel(messageLabelMobile);

        emailPatientLabel.setFont(CSS.h3);
        emailPatientLabel.setText(bundle.getString("i18n.email.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        analysisStep2Form.add(emailPatientLabel, gridBagConstraints);

        emailPatient.setColumns(CSS.columnsTextField);
        emailPatient.setFont(CSS.h3);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(emailPatient, gridBagConstraints);
        emailPatient.attachMessageLabel(messageLabelEmail);

        messageLabelName.setFont(CSS.h3);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(messageLabelName, gridBagConstraints);

        messageLabelSurname.setFont(CSS.h3);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(messageLabelSurname, gridBagConstraints);

        messageLabelEmail.setFont(CSS.h3);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(messageLabelEmail, gridBagConstraints);

        messageLabelTel.setFont(CSS.h3);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(messageLabelTel, gridBagConstraints);

        messageLabelMobile.setFont(CSS.h3);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        analysisStep2Form.add(messageLabelMobile, gridBagConstraints);

        spacer3.setMinimumSize(new java.awt.Dimension(175, 25));
        spacer3.setPreferredSize(new java.awt.Dimension(175, 25));

        javax.swing.GroupLayout spacer3Layout = new javax.swing.GroupLayout(spacer3);
        spacer3.setLayout(spacer3Layout);
        spacer3Layout.setHorizontalGroup(
            spacer3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 175, Short.MAX_VALUE)
        );
        spacer3Layout.setVerticalGroup(
            spacer3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        analysisStep2Form.add(spacer3, gridBagConstraints);

        errorPane.setForeground(java.awt.Color.red);
        errorPane.setLayout(new javax.swing.BoxLayout(errorPane, javax.swing.BoxLayout.Y_AXIS));

        mandatoryRequirements.setFont(CSS.h3);
        errorPane.add(mandatoryRequirements);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
        analysisStep2Form.add(errorPane, gridBagConstraints);

        analysisStep2Body.add(analysisStep2Form, java.awt.BorderLayout.CENTER);

        analysisStep2InsertPatient.add(analysisStep2Body, java.awt.BorderLayout.CENTER);

        wizardButtonBar2.setLayout(new java.awt.BorderLayout());
        wizardButtonBar2.add(jSeparator2, java.awt.BorderLayout.PAGE_START);

        innerButtonBar2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        back2.setText(bundle.getString("i18n.back")); // NOI18N
        back2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                back2ActionPerformed(evt);
            }
        });
        innerButtonBar2.add(back2);

        forward2.setEnabled(false);
        forward2.setText(bundle.getString("i18n.forward")); // NOI18N
        forward2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                forward2MouseReleased(evt);
            }
        });
        forward2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                forward2ActionPerformed(evt);
            }
        });
        innerButtonBar2.add(forward2);

        wizardButtonBar2.add(innerButtonBar2, java.awt.BorderLayout.CENTER);

        analysisStep2InsertPatient.add(wizardButtonBar2, java.awt.BorderLayout.PAGE_END);

        analysisStep3.setMinimumSize(new java.awt.Dimension(500, 500));
        analysisStep3.setPreferredSize(new java.awt.Dimension(500, 500));
        analysisStep3.setLayout(new java.awt.BorderLayout());

        analysisStep3Head.setMinimumSize(new java.awt.Dimension(207, 35));
        analysisStep3Head.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        titleStep3.setFont(CSS.h1);
        titleStep3.setText(bundle.getString("i18n.select.analysis.type")); // NOI18N
        analysisStep3Head.add(titleStep3);

        analysisStep3.add(analysisStep3Head, java.awt.BorderLayout.PAGE_START);

        analysisStep3Body.setMinimumSize(new java.awt.Dimension(100, 100));
        analysisStep3Body.setLayout(new java.awt.GridBagLayout());

        decisionStep3.setFont(CSS.h3);
        decisionStep3.setText(bundle.getString("i18n.select.analysis.type")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        analysisStep3Body.add(decisionStep3, gridBagConstraints);

        spacer.setMinimumSize(new java.awt.Dimension(50, 10));
        spacer.setPreferredSize(new java.awt.Dimension(50, 10));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        analysisStep3Body.add(spacer, gridBagConstraints);

        radioSingleFrame.setFont(CSS.h3);
        radioSingleFrame.setText(bundle.getString("i18n.single.frame.analysis")); // NOI18N
        radioSingleFrame.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioSingleFrameActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        analysisStep3Body.add(radioSingleFrame, gridBagConstraints);

        radioDoubleFrame.setFont(CSS.h3);
        radioDoubleFrame.setText(bundle.getString("i18n.double.frame.analysis")); // NOI18N
        radioDoubleFrame.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioDoubleFrameActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        analysisStep3Body.add(radioDoubleFrame, gridBagConstraints);

        javax.swing.GroupLayout spacer5Layout = new javax.swing.GroupLayout(spacer5);
        spacer5.setLayout(spacer5Layout);
        spacer5Layout.setHorizontalGroup(
            spacer5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 231, Short.MAX_VALUE)
        );
        spacer5Layout.setVerticalGroup(
            spacer5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 356, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
        analysisStep3Body.add(spacer5, gridBagConstraints);

        analysisStep3.add(analysisStep3Body, java.awt.BorderLayout.CENTER);

        wizardButtonBar3.setLayout(new java.awt.BorderLayout());
        wizardButtonBar3.add(jSeparator3, java.awt.BorderLayout.PAGE_START);

        innerButtonBar3.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        back3.setText(bundle.getString("i18n.back")); // NOI18N
        back3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                back3ActionPerformed(evt);
            }
        });
        innerButtonBar3.add(back3);

        forward3.setText(bundle.getString("i18n.forward")); // NOI18N
        forward3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                forward3ActionPerformed(evt);
            }
        });
        innerButtonBar3.add(forward3);

        wizardButtonBar3.add(innerButtonBar3, java.awt.BorderLayout.CENTER);

        analysisStep3.add(wizardButtonBar3, java.awt.BorderLayout.PAGE_END);

        forward3.setEnabled(false);

        analysisStep4.setFont(CSS.h3);
        analysisStep4.setMinimumSize(new java.awt.Dimension(500, 500));
        analysisStep4.setPreferredSize(new java.awt.Dimension(500, 500));
        analysisStep4.setLayout(new java.awt.BorderLayout());

        analysisStep4Head.setMinimumSize(new java.awt.Dimension(207, 35));
        analysisStep4Head.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        titleStep4.setFont(CSS.h1);
        titleStep4.setText(bundle.getString("i18n.scan.reagent.barcode")); // NOI18N
        analysisStep4Head.add(titleStep4);

        analysisStep4.add(analysisStep4Head, java.awt.BorderLayout.PAGE_START);

        analysisStep4Body.setMinimumSize(new java.awt.Dimension(100, 100));
        analysisStep4Body.setLayout(new java.awt.GridBagLayout());

        spacer6.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        resultReagentScan.setFont(CSS.h3);
        spacer6.add(resultReagentScan);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
        analysisStep4Body.add(spacer6, gridBagConstraints);

        analysisStep4.add(analysisStep4Body, java.awt.BorderLayout.CENTER);

        wizardButtonBar4.setLayout(new java.awt.BorderLayout());
        wizardButtonBar4.add(jSeparator4, java.awt.BorderLayout.PAGE_START);

        innerButtonBar4.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        back4.setText(bundle.getString("i18n.back")); // NOI18N
        back4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                back4ActionPerformed(evt);
            }
        });
        innerButtonBar4.add(back4);

        forward4.setText(bundle.getString("i18n.forward")); // NOI18N
        forward4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                forward4ActionPerformed(evt);
            }
        });
        innerButtonBar4.add(forward4);

        wizardButtonBar4.add(innerButtonBar4, java.awt.BorderLayout.CENTER);

        analysisStep4.add(wizardButtonBar4, java.awt.BorderLayout.PAGE_END);

        forward3.setEnabled(false);

        analysisStep5.setMinimumSize(new java.awt.Dimension(500, 500));
        analysisStep5.setPreferredSize(new java.awt.Dimension(500, 500));
        analysisStep5.setLayout(new java.awt.BorderLayout());

        analysisStep5Head.setMinimumSize(new java.awt.Dimension(207, 35));
        analysisStep5Head.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        titleStep5.setFont(CSS.h1);
        titleStep5.setText(getNumberFrame()+java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("'_")+bundle.getString("i18n.scan.frame.barcode"));
        titleStep6.setFont(CSS.h3);
        analysisStep5Head.add(titleStep5);

        analysisStep5.add(analysisStep5Head, java.awt.BorderLayout.PAGE_START);

        analysisStep5Body.setMinimumSize(new java.awt.Dimension(100, 100));
        analysisStep5Body.setLayout(new java.awt.GridBagLayout());

        spacer7.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        resultFrameBarcodeScan.setFont(CSS.h3);
        spacer7.add(resultFrameBarcodeScan);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
        analysisStep5Body.add(spacer7, gridBagConstraints);

        analysisStep5.add(analysisStep5Body, java.awt.BorderLayout.CENTER);

        wizardButtonBar5.setLayout(new java.awt.BorderLayout());
        wizardButtonBar5.add(jSeparator5, java.awt.BorderLayout.PAGE_START);

        innerButtonBar5.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        back5.setText(bundle.getString("i18n.back")); // NOI18N
        back5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                back5ActionPerformed(evt);
            }
        });
        innerButtonBar5.add(back5);

        forward5.setText(bundle.getString("i18n.forward")); // NOI18N
        forward5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                forward5ActionPerformed(evt);
            }
        });
        innerButtonBar5.add(forward5);

        wizardButtonBar5.add(innerButtonBar5, java.awt.BorderLayout.CENTER);

        analysisStep5.add(wizardButtonBar5, java.awt.BorderLayout.PAGE_END);

        forward3.setEnabled(false);

        analysisStep6.setFont(CSS.h3);
        analysisStep6.setMinimumSize(new java.awt.Dimension(500, 500));
        analysisStep6.setPreferredSize(new java.awt.Dimension(500, 500));
        analysisStep6.setLayout(new java.awt.BorderLayout());

        analysisStep6Head.setMinimumSize(new java.awt.Dimension(207, 35));
        analysisStep6Head.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        titleStep6.setFont(CSS.h1);
        titleStep6.setText(getNumberFrame()+bundle.getString("'_")+bundle.getString("i18n.scan.frame"));
        analysisStep6Head.add(titleStep6);

        analysisStep6.add(analysisStep6Head, java.awt.BorderLayout.PAGE_START);

        analysisStep6Body.setMinimumSize(new java.awt.Dimension(100, 100));
        analysisStep6Body.setLayout(new java.awt.GridBagLayout());

        descriptionPanel.setLayout(new java.awt.GridLayout(2, 1));

        descriptionLabelScanFrame1.setFont(CSS.h3);
        descriptionLabelScanFrame1.setText(bundle.getString("i18n.description.scan.frame.step1")); // NOI18N
        descriptionPanel.add(descriptionLabelScanFrame1);

        descriptionLabelScanFrame2.setFont(CSS.h3);
        descriptionLabelScanFrame2.setText(bundle.getString("i18n.description.scan.frame.step2")); // NOI18N
        descriptionPanel.add(descriptionLabelScanFrame2);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
        analysisStep6Body.add(descriptionPanel, gridBagConstraints);

        spacer8.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        resultFrameScan.setFont(CSS.h3);
        spacer8.add(resultFrameScan);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
        analysisStep6Body.add(spacer8, gridBagConstraints);

        frameScanButton.setText(bundle.getString("i18n.scan")); // NOI18N
        frameScanButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                frameScanButtonActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 5);
        analysisStep6Body.add(frameScanButton, gridBagConstraints);

        analysisStep6.add(analysisStep6Body, java.awt.BorderLayout.CENTER);

        wizardButtonBar6.setLayout(new java.awt.BorderLayout());
        wizardButtonBar6.add(jSeparator6, java.awt.BorderLayout.PAGE_START);

        innerButtonBar6.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        back6.setText(bundle.getString("i18n.back")); // NOI18N
        back6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                back6ActionPerformed(evt);
            }
        });
        innerButtonBar6.add(back6);

        forward6.setText(bundle.getString("i18n.forward")); // NOI18N
        forward6.setEnabled(false);
        forward6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                forward6ActionPerformed(evt);
            }
        });
        innerButtonBar6.add(forward6);

        wizardButtonBar6.add(innerButtonBar6, java.awt.BorderLayout.CENTER);

        analysisStep6.add(wizardButtonBar6, java.awt.BorderLayout.PAGE_END);

        forward3.setEnabled(false);

        searchPatientPanel.setMinimumSize(new java.awt.Dimension(500, 500));
        searchPatientPanel.setPreferredSize(new java.awt.Dimension(500, 500));
        searchPatientPanel.setLayout(new java.awt.GridBagLayout());

        searchPanel.setMinimumSize(new java.awt.Dimension(207, 35));
        searchPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        searchPatientPanelLabel.setFont(CSS.h1);
        searchPatientPanelLabel.setText(bundle.getString("i18n.search.patient.panel")); // NOI18N
        searchPanel.add(searchPatientPanelLabel);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        searchPatientPanel.add(searchPanel, gridBagConstraints);

        filterPanel.setLayout(new java.awt.BorderLayout());

        searchBodyPanel.setLayout(new java.awt.GridBagLayout());

        namePatientSearchLabel.setText(bundle.getString("i18n.name.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 5);
        searchBodyPanel.add(namePatientSearchLabel, gridBagConstraints);

        namePatientSearch.setColumns(CSS.columnsTextField);
        namePatientSearch.setMinimumSize(new java.awt.Dimension(27, 30));

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, patientFilter, org.jdesktop.beansbinding.ELProperty.create("${name}"), namePatientSearch, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 5);
        searchBodyPanel.add(namePatientSearch, gridBagConstraints);

        surnamePatientSearchLabel.setText(bundle.getString("i18n.surname.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 10, 5);
        searchBodyPanel.add(surnamePatientSearchLabel, gridBagConstraints);

        surnamePatientSearch.setColumns(CSS.columnsTextField);
        surnamePatientSearch.setMinimumSize(new java.awt.Dimension(27, 30));

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, patientFilter, org.jdesktop.beansbinding.ELProperty.create("${surname}"), surnamePatientSearch, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 10, 5);
        searchBodyPanel.add(surnamePatientSearch, gridBagConstraints);

        filterPanel.add(searchBodyPanel, java.awt.BorderLayout.CENTER);

        wizardButtonBar7.setLayout(new java.awt.BorderLayout());
        wizardButtonBar7.add(jSeparator7, java.awt.BorderLayout.PAGE_START);

        innerButtonBar7.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        back9.setText(bundle.getString("i18n.back")); // NOI18N
        back9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                back9ActionPerformed(evt);
            }
        });
        back9.setVisible(false);
        innerButtonBar7.add(back9);

        reset.setText(bundle.getString("i18n.reset")); // NOI18N
        reset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                resetActionPerformed(evt);
            }
        });
        innerButtonBar7.add(reset);

        searchPatient.setText(bundle.getString("i18n.patient.search")); // NOI18N
        searchPatient.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchPatientActionPerformed(evt);
            }
        });
        innerButtonBar7.add(searchPatient);

        wizardButtonBar7.add(innerButtonBar7, java.awt.BorderLayout.CENTER);

        filterPanel.add(wizardButtonBar7, java.awt.BorderLayout.PAGE_END);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        searchPatientPanel.add(filterPanel, gridBagConstraints);

        dataTablePanel.setLayout(new java.awt.BorderLayout());

        String[] COLUMN_NAMES = JTableSupport.getPatientColumn();
        DefaultTableModel tableModel = JTableSupport.getNewTableModelForResults(COLUMN_NAMES);
        patientResultTable.setModel(tableModel);
        JTableSupport.setSizeForIconButton(patientResultTable, 0);
        jScrollPane1.setViewportView(patientResultTable);

        dataTablePanel.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        noPatientResult.setFont(CSS.h3);
        dataTablePanel.add(noPatientResult, java.awt.BorderLayout.PAGE_END);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        searchPatientPanel.add(dataTablePanel, gridBagConstraints);

        editPatient.setMinimumSize(new java.awt.Dimension(500, 500));
        editPatient.setPreferredSize(new java.awt.Dimension(500, 500));
        editPatient.setLayout(new java.awt.BorderLayout());

        analysisStep2Head1.setMinimumSize(new java.awt.Dimension(207, 35));
        analysisStep2Head1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        titleStep33.setFont(CSS.h1);
        analysisStep2Head1.add(titleStep33);

        editPatient.add(analysisStep2Head1, java.awt.BorderLayout.PAGE_START);

        innerEditPatient.setMinimumSize(new java.awt.Dimension(500, 450));
        innerEditPatient.setPreferredSize(new java.awt.Dimension(500, 450));
        innerEditPatient.setLayout(new java.awt.GridBagLayout());
        editPatient.add(innerEditPatient, java.awt.BorderLayout.CENTER);

        wizardButtonBar8.setLayout(new java.awt.BorderLayout());
        wizardButtonBar8.add(jSeparator8, java.awt.BorderLayout.PAGE_START);

        innerButtonBar8.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        back7.setText(bundle.getString("i18n.back")); // NOI18N
        back7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                back7ActionPerformed(evt);
            }
        });
        innerButtonBar8.add(back7);

        forward2.setEnabled(false);
        deletePatient.setText(bundle.getString("i18n.delete")); // NOI18N
        deletePatient.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                deletePatientMouseReleased(evt);
            }
        });
        deletePatient.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deletePatientActionPerformed(evt);
            }
        });
        innerButtonBar8.add(deletePatient);

        forward2.setEnabled(false);
        savePatient.setText(bundle.getString("i18n.save")); // NOI18N
        savePatient.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                savePatientMouseReleased(evt);
            }
        });
        savePatient.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                savePatientActionPerformed(evt);
            }
        });
        innerButtonBar8.add(savePatient);

        wizardButtonBar8.add(innerButtonBar8, java.awt.BorderLayout.CENTER);

        editPatient.add(wizardButtonBar8, java.awt.BorderLayout.PAGE_END);

        dataTablePanel1.setLayout(new java.awt.BorderLayout());

        String[] COLUMN_NAMES_RESULTS = JTableSupport.getResultColumn();
        DefaultTableModel tableModelResults = JTableSupport.getNewTableModelForResults(COLUMN_NAMES_RESULTS);
        resultTable.setModel(tableModelResults);
        JTableSupport.setSizeForIconButton(resultTable, 0);
        jScrollPane2.setViewportView(resultTable);

        dataTablePanel1.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        noResult.setFont(CSS.h3);
        dataTablePanel1.add(noResult, java.awt.BorderLayout.PAGE_END);

        searchResultPanel.setMinimumSize(new java.awt.Dimension(500, 500));
        searchResultPanel.setPreferredSize(new java.awt.Dimension(500, 500));
        searchResultPanel.setLayout(new java.awt.GridBagLayout());

        searchResult.setMinimumSize(new java.awt.Dimension(207, 35));
        searchResult.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        searchResultPanelLabel.setFont(CSS.h1);
        searchResultPanelLabel.setText(bundle.getString("i18n.search.result.panel")); // NOI18N
        searchResult.add(searchResultPanelLabel);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        searchResultPanel.add(searchResult, gridBagConstraints);

        filterResultPanel.setLayout(new java.awt.BorderLayout());

        searchBodyPanel1.setLayout(new java.awt.GridBagLayout());

        barCodeReagentSearchLabel.setFont(CSS.h3);
        barCodeReagentSearchLabel.setText(bundle.getString("i18n.barCodeReagent.search")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 5);
        searchBodyPanel1.add(barCodeReagentSearchLabel, gridBagConstraints);

        barCodeReagentSearch.setColumns(CSS.columnsTextField);
        barCodeReagentSearch.setMinimumSize(new java.awt.Dimension(27, 30));

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, allergicTestFilter, org.jdesktop.beansbinding.ELProperty.create("${barcode}"), barCodeReagentSearch, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 5);
        searchBodyPanel1.add(barCodeReagentSearch, gridBagConstraints);

        singleFrameLabel.setFont(CSS.h3);
        singleFrameLabel.setText(bundle.getString("i18n.analysis")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        searchBodyPanel1.add(singleFrameLabel, gridBagConstraints);

        typeFrame.setLayout(new java.awt.GridLayout(1, 2));

        singleFrameCheck.setFont(CSS.h3);
        singleFrameCheck.setText(bundle.getString("i18n.single.at")); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, allergicTestFilter, org.jdesktop.beansbinding.ELProperty.create("${singleFrame}"), singleFrameCheck, org.jdesktop.beansbinding.BeanProperty.create("selected"));
        bindingGroup.addBinding(binding);

        typeFrame.add(singleFrameCheck);

        doubleFrameCheck.setFont(CSS.h3);
        doubleFrameCheck.setText(bundle.getString("i18n.double.frame")); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, allergicTestFilter, org.jdesktop.beansbinding.ELProperty.create("${doubleFrame}"), doubleFrameCheck, org.jdesktop.beansbinding.BeanProperty.create("selected"));
        bindingGroup.addBinding(binding);

        typeFrame.add(doubleFrameCheck);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        searchBodyPanel1.add(typeFrame, gridBagConstraints);

        fromDateLabel.setFont(CSS.h3);
        fromDateLabel.setText(bundle.getString("i18n.from")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        searchBodyPanel1.add(fromDateLabel, gridBagConstraints);

        fromDate.setLocale(Locale.ENGLISH);
        fromDate.setDateFormatString("dd/MM/yyyy");
        fromDate.setFont(CSS.h3);
        fromDate.setMinimumSize(new java.awt.Dimension(27, 30));
        fromDate.setPreferredSize(new java.awt.Dimension(137, 30));

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, allergicTestFilter, org.jdesktop.beansbinding.ELProperty.create("${fromDate}"), fromDate, org.jdesktop.beansbinding.BeanProperty.create("date"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        searchBodyPanel1.add(fromDate, gridBagConstraints);

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", ">=", ">", "=" }));

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, allergicTestFilter, org.jdesktop.beansbinding.ELProperty.create("${fromRange}"), jComboBox1, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        searchBodyPanel1.add(jComboBox1, gridBagConstraints);

        toDateLabel.setFont(CSS.h3);
        toDateLabel.setText(bundle.getString("i18n.to")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(3, 0, 3, 3);
        searchBodyPanel1.add(toDateLabel, gridBagConstraints);

        toDate.setLocale(Locale.ENGLISH);
        toDate.setDateFormatString("dd/MM/yyyy");
        toDate.setFont(CSS.h3);
        toDate.setMinimumSize(new java.awt.Dimension(27, 30));
        toDate.setPreferredSize(new java.awt.Dimension(137, 30));

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, allergicTestFilter, org.jdesktop.beansbinding.ELProperty.create("${toDate}"), toDate, org.jdesktop.beansbinding.BeanProperty.create("date"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0);
        searchBodyPanel1.add(toDate, gridBagConstraints);

        jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "<=", "<", "=" }));

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, allergicTestFilter, org.jdesktop.beansbinding.ELProperty.create("${toRange}"), jComboBox2, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        searchBodyPanel1.add(jComboBox2, gridBagConstraints);

        filterResultPanel.add(searchBodyPanel1, java.awt.BorderLayout.CENTER);

        wizardButtonBar9.setLayout(new java.awt.BorderLayout());
        wizardButtonBar9.add(jSeparator9, java.awt.BorderLayout.PAGE_START);

        innerButtonBar9.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        reset1.setText(bundle.getString("i18n.reset")); // NOI18N
        reset1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                reset1ActionPerformed(evt);
            }
        });
        innerButtonBar9.add(reset1);

        searchFrame.setText(bundle.getString("i18n.patient.search")); // NOI18N
        searchFrame.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchFrameActionPerformed(evt);
            }
        });
        innerButtonBar9.add(searchFrame);

        wizardButtonBar9.add(innerButtonBar9, java.awt.BorderLayout.CENTER);

        filterResultPanel.add(wizardButtonBar9, java.awt.BorderLayout.PAGE_END);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 0.6;
        searchResultPanel.add(filterResultPanel, gridBagConstraints);

        showResultPanel.setMinimumSize(new java.awt.Dimension(500, 500));
        showResultPanel.setPreferredSize(new java.awt.Dimension(500, 500));
        showResultPanel.setLayout(new java.awt.BorderLayout());

        analysisStep2Head2.setMinimumSize(new java.awt.Dimension(207, 35));
        analysisStep2Head2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        titleStep34.setFont(CSS.h1);
        titleStep34.setText(bundle.getString("i18n.allergic.test.datail.panel")); // NOI18N
        analysisStep2Head2.add(titleStep34);

        showResultPanel.add(analysisStep2Head2, java.awt.BorderLayout.PAGE_START);

        innerShowResult.setMinimumSize(new java.awt.Dimension(500, 450));
        innerShowResult.setPreferredSize(new java.awt.Dimension(500, 450));
        innerShowResult.setLayout(new java.awt.GridBagLayout());

        detailPatient.setLayout(new java.awt.GridBagLayout());

        patientLabel.setFont(CSS.h3);
        patientLabel.setText(bundle.getString("i18n.patient")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
        detailPatient.add(patientLabel, gridBagConstraints);

        outNamePatient.setFont(CSS.h3);

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, modelAllergicTest, org.jdesktop.beansbinding.ELProperty.create("${patient.name} ${patient.surname}"), outNamePatient, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
        detailPatient.add(outNamePatient, gridBagConstraints);

        outSurnamePatient.setFont(CSS.h3);

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, modelAllergicTest, org.jdesktop.beansbinding.ELProperty.create("${patient.surname}"), outSurnamePatient, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
        detailPatient.add(outSurnamePatient, gridBagConstraints);

        outBithdatePatient.setFont(CSS.h3);

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, modelAllergicTest, org.jdesktop.beansbinding.ELProperty.create("${patient.birthDate}"), outBithdatePatient, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 5);
        detailPatient.add(outBithdatePatient, gridBagConstraints);

        outTelephonePatient.setFont(CSS.h3);

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, modelAllergicTest, org.jdesktop.beansbinding.ELProperty.create("${patient.telephone}"), outTelephonePatient, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 5);
        detailPatient.add(outTelephonePatient, gridBagConstraints);

        outMobilePatient.setFont(CSS.h3);

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, modelAllergicTest, org.jdesktop.beansbinding.ELProperty.create("${patient.mobile}"), outMobilePatient, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 5);
        detailPatient.add(outMobilePatient, gridBagConstraints);

        outEmailPatient.setFont(CSS.h3);

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, modelAllergicTest, org.jdesktop.beansbinding.ELProperty.create("${patient.email}"), outEmailPatient, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 5);
        detailPatient.add(outEmailPatient, gridBagConstraints);

        telLabel.setFont(CSS.h3);
        telLabel.setText(bundle.getString("i18n.tel")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
        detailPatient.add(telLabel, gridBagConstraints);

        mobLabel.setFont(CSS.h3);
        mobLabel.setText(bundle.getString("i18n.mobLabel")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
        detailPatient.add(mobLabel, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 5, 0);
        innerShowResult.add(detailPatient, gridBagConstraints);

        dataATLabel.setFont(CSS.h3);
        dataATLabel.setText(bundle.getString("i18n.date.at")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 0, 5);
        innerShowResult.add(dataATLabel, gridBagConstraints);

        outDataAT.setFont(CSS.h3);

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, modelAllergicTest, org.jdesktop.beansbinding.ELProperty.create("${date}"), outDataAT, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        innerShowResult.add(outDataAT, gridBagConstraints);

        barcodeATlabel.setFont(CSS.h3);
        barcodeATlabel.setText(bundle.getString("i18n.barcode.reagent.at")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 5, 5);
        innerShowResult.add(barcodeATlabel, gridBagConstraints);

        outBarcodeAT.setFont(CSS.h3);

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, allergicTestFilter, org.jdesktop.beansbinding.ELProperty.create("${barcode}"), outBarcodeAT, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);
        innerShowResult.add(outBarcodeAT, gridBagConstraints);

        frame1Barcode.setFont(CSS.h3);
        frame1Barcode.setText(bundle.getString("i18n.frame1.barcode")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 0, 5);
        innerShowResult.add(frame1Barcode, gridBagConstraints);

        jLabel1.setFont(CSS.h3);
        jLabel1.setText("jLabel1");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        innerShowResult.add(jLabel1, gridBagConstraints);

        frame2Barcode.setFont(CSS.h3);
        frame2Barcode.setText(bundle.getString("i18n.barcode.second.frame")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
        innerShowResult.add(frame2Barcode, gridBagConstraints);

        jLabel2.setFont(CSS.h3);
        jLabel2.setText("jLabel2");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        innerShowResult.add(jLabel2, gridBagConstraints);

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane3.setViewportView(jTable1);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 0.5;
        gridBagConstraints.weighty = 0.8;
        gridBagConstraints.insets = new java.awt.Insets(0, 20, 5, 5);
        innerShowResult.add(jScrollPane3, gridBagConstraints);

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane4.setViewportView(jTable2);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 0.5;
        gridBagConstraints.weighty = 0.6;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 5);
        innerShowResult.add(jScrollPane4, gridBagConstraints);

        showResultPanel.add(innerShowResult, java.awt.BorderLayout.CENTER);

        wizardButtonBar10.setLayout(new java.awt.BorderLayout());
        wizardButtonBar10.add(jSeparator10, java.awt.BorderLayout.PAGE_START);

        innerButtonBar10.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        back8.setText(bundle.getString("i18n.back")); // NOI18N
        back8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                back8ActionPerformed(evt);
            }
        });
        innerButtonBar10.add(back8);

        forward2.setEnabled(false);
        deletePatient1.setText(bundle.getString("i18n.delete")); // NOI18N
        deletePatient1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                deletePatient1MouseReleased(evt);
            }
        });
        deletePatient1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                deletePatient1ActionPerformed(evt);
            }
        });
        innerButtonBar10.add(deletePatient1);

        wizardButtonBar10.add(innerButtonBar10, java.awt.BorderLayout.CENTER);

        showResultPanel.add(wizardButtonBar10, java.awt.BorderLayout.PAGE_END);

        setBackground(new java.awt.Color(255, 255, 255));
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        getContentPane().setLayout(new java.awt.GridLayout(1, 0));

        contentPane.setMinimumSize(new java.awt.Dimension(800, 600));
        contentPane.setPreferredSize(new java.awt.Dimension(800, 600));
        contentPane.setLayout(new java.awt.BorderLayout());

        headPanel.setBackground(new java.awt.Color(255, 255, 255));
        headPanel.setMaximumSize(new java.awt.Dimension(32767, 100));
        headPanel.setMinimumSize(new java.awt.Dimension(800, 100));
        headPanel.setPreferredSize(new java.awt.Dimension(0, 100));
        headPanel.setLayout(new java.awt.GridBagLayout());

        putHereImage.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        putHereImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/it/allerj/gui/allerj_header.jpg"))); // NOI18N
        putHereImage.setText(bundle.getString("head_put_here_a_image")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.0;
        headPanel.add(putHereImage, gridBagConstraints);

        allerJTitle.setFont(CSS.applicationTitle);
        allerJTitle.setForeground(CSS.background);
        allerJTitle.setText(bundle.getString("Allerj")); // NOI18N
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 10);
        headPanel.add(allerJTitle, gridBagConstraints);

        contentPane.add(headPanel, java.awt.BorderLayout.PAGE_START);

        jTabbedPane.setBackground(new java.awt.Color(255, 255, 255));
        jTabbedPane.setBorder(new javax.swing.border.LineBorder(CSS.black, 1, true));
        jTabbedPane.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
        jTabbedPane.setTabPlacement(javax.swing.JTabbedPane.LEFT);
        jTabbedPane.setFont(CSS.h1);
        jTabbedPane.setMinimumSize(new java.awt.Dimension(0, 0));
        jTabbedPane.setPreferredSize(new java.awt.Dimension(0, 0));
        jTabbedPane.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                jTabbedPaneMousePressed(evt);
            }
        });

        analysisPane.setLayout(new java.awt.GridLayout(1, 1));
        analysisPane.add(welcomeAnalysis);
        jTabbedPane.addTab(bundle.getString("i18n.analysisPane"), analysisPane); // NOI18N

        patientPane.setLayout(new java.awt.GridLayout(1, 1));
        patientPane.add(searchPatientPanel);
        jTabbedPane.addTab(bundle.getString("i18n.patientPane"), patientPane); // NOI18N

        resultPane.setLayout(new java.awt.GridLayout(1, 1));
        resultPane.add(searchResultPanel);
        jTabbedPane.addTab(bundle.getString("i18n.resultPane"), resultPane); // NOI18N

        contentPane.add(jTabbedPane, java.awt.BorderLayout.CENTER);

        footerPane.setBackground(CSS.background);
        footerPane.setMaximumSize(new java.awt.Dimension(32767, 25));
        footerPane.setMinimumSize(new java.awt.Dimension(800, 25));
        footerPane.setPreferredSize(new java.awt.Dimension(800, 25));

        javax.swing.GroupLayout footerPaneLayout = new javax.swing.GroupLayout(footerPane);
        footerPane.setLayout(footerPaneLayout);
        footerPaneLayout.setHorizontalGroup(
            footerPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 2400, Short.MAX_VALUE)
        );
        footerPaneLayout.setVerticalGroup(
            footerPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 25, Short.MAX_VALUE)
        );

        contentPane.add(footerPane, java.awt.BorderLayout.PAGE_END);

        getContentPane().add(contentPane);
        this.setContentPane(contentPane);

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void forwardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_forwardActionPerformed
        resetForms();
        analysisPane.remove(welcomeAnalysis);
        analysisPane.add(analysisStep1);
        
        jTabbedPane.setEnabledAt(1, false);
        jTabbedPane.setEnabledAt(2, false);
        exit.setEnabled(true);
        back9.setVisible(true);
        repaint();
        pack();
    }//GEN-LAST:event_forwardActionPerformed

    private void forward3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_forward3ActionPerformed
        //repeatNTime = (radioSingleFrame.isSelected())?1:2;
        allergicTest = (radioSingleFrame.isSelected()) ? new AllergicTestSingleFrame(): new AllergicTestDoubleFrame();
        
        //analysisPane.remove(analysisStep3);
        //analysisPane.add(analysisStep4);
        
        analysisPane.remove(analysisStep3);
        analysisPane.add(analysisStep6);
        
        repaint();
        pack();
}//GEN-LAST:event_forward3ActionPerformed

    private void back1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_back1ActionPerformed
        analysisPane.remove(analysisStep1);
        analysisPane.add(welcomeAnalysis);
        repaint();
        pack();
}//GEN-LAST:event_back1ActionPerformed

    private void back3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_back3ActionPerformed
        analysisPane.remove(analysisStep3);
        analysisPane.add(analysisStep2);
        repaint();
        pack();
}//GEN-LAST:event_back3ActionPerformed

    private void radioSingleFrameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioSingleFrameActionPerformed
        forward3.setEnabled(true);
    }//GEN-LAST:event_radioSingleFrameActionPerformed

    private void radioSelectPatientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioSelectPatientActionPerformed
         forward1.setEnabled(true);
    }//GEN-LAST:event_radioSelectPatientActionPerformed

    private void radioInsertPatientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioInsertPatientActionPerformed
         forward1.setEnabled(true);
    }//GEN-LAST:event_radioInsertPatientActionPerformed

    private void radioDoubleFrameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioDoubleFrameActionPerformed
        forward3.setEnabled(true);
    }//GEN-LAST:event_radioDoubleFrameActionPerformed

    private void forward1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_forward1ActionPerformed
        if(radioInsertPatient.isSelected()){
            analysisStep2 = analysisStep2InsertPatient;
            modelPatient = new Patient();
            bindingPatientToEditPanel();
            analysisStep2.add(analysisStep2Body, java.awt.BorderLayout.CENTER);
            
        }
        if(radioSelectPatient.isSelected()){
            
            analysisStep2 = searchPatientPanel;
            modelPatient = null;         
        }
        
        analysisPane.remove(analysisStep1);
        analysisPane.add(analysisStep2);
        repaint();
        pack();
}//GEN-LAST:event_forward1ActionPerformed

    private void surnamePatientCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_surnamePatientCaretUpdate
        chooseIfEnableForward2();
    }//GEN-LAST:event_surnamePatientCaretUpdate

    private void back4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_back4ActionPerformed
        analysisPane.remove(analysisStep4);
        analysisPane.add(analysisStep3);
        repaint();
        pack();
    }//GEN-LAST:event_back4ActionPerformed

    private void forward4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_forward4ActionPerformed
        analysisPane.remove(analysisStep4);
        analysisPane.add(analysisStep5);
        repaint();
        pack();
    }//GEN-LAST:event_forward4ActionPerformed

    private void back5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_back5ActionPerformed
        analysisPane.remove(analysisStep5);
        analysisPane.add(analysisStep4);
        repaint();
        pack();
    }//GEN-LAST:event_back5ActionPerformed

    private void forward5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_forward5ActionPerformed
        analysisPane.remove(analysisStep5);
        analysisPane.add(analysisStep6);
        repaint();
        pack();
    }//GEN-LAST:event_forward5ActionPerformed

    private void back6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_back6ActionPerformed
        //analysisPane.remove(analysisStep6);
        //analysisPane.add(analysisStep5);
        
        analysisPane.remove(analysisStep6);
        analysisPane.add(analysisStep3);
        repaint();
        pack();
    }//GEN-LAST:event_back6ActionPerformed

    private void forward6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_forward6ActionPerformed
        // TODO add your handling code here:
        if("save".equals(((JButton)evt.getSource()).getActionCommand())){
            
            int n = JOptionPane.showOptionDialog(
                this,
                java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.Would.you.like.save"),
                java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.Confirm"),
                JOptionPane.YES_NO_OPTION,
                JOptionPane.QUESTION_MESSAGE,
                null,     //do not use a custom Icon
                yesNotOptions,  //the titles of buttons
                yesNotOptions[0]);
            if(n==0){
                /*ModelConnector connector = new ModelConnector();
                connector.connect(image);*/
                if(modelPatient.getAllergicTestSet()==null){
                    modelPatient.setAllergicTestSet(new HashSet<AllergicTest>());  
                }
                guiAction.savePersistenceObject(modelPatient);
                
                allergicTest = AllergicTestFactory.getAllergicTest(image, "MatrixOne", "000000", allergicTest);
                if(allergicTest instanceof AllergicTestDoubleFrame){
                   allergicTest = AllergicTestFactory.getAllergicTest(image2, "MatrixTwo", "000001", allergicTest);
                }
                
                modelPatient.getAllergicTestSet().add(allergicTest);
                allergicTest.setPatient(modelPatient);
                guiAction.savePersistenceObject(modelPatient);
                
               resetView();
            } 
        } else {
            // TODO add your handling code here:
        }
    }//GEN-LAST:event_forward6ActionPerformed

    private void exitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitActionPerformed
        int n = JOptionPane.showOptionDialog(
                this,
                java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.Would.you.like.exit"),
                java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.Confirm"),
                JOptionPane.YES_NO_OPTION,
                JOptionPane.QUESTION_MESSAGE,
                null,     //do not use a custom Icon
                defaultOptions,  //the titles of buttons
                defaultOptions[0]);
        if(n==0){
        resetForms();
            jTabbedPane.setEnabledAt(1, true);
            jTabbedPane.setEnabledAt(2, true);
        }
       
    }//GEN-LAST:event_exitActionPerformed

    private void namePatientCaretUpdate(javax.swing.event.CaretEvent evt) {//GEN-FIRST:event_namePatientCaretUpdate
        chooseIfEnableForward2();
    }//GEN-LAST:event_namePatientCaretUpdate

    private void frameScanButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_frameScanButtonActionPerformed
      startScanProcedure();

    }//GEN-LAST:event_frameScanButtonActionPerformed
    public void startScanProcedure(){
          frameScanButton.setEnabled(false);
            this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        //Instances of javax.swing.SwingWorker are not reusuable, so
        //we create new instances as needed.
            ScanFrameTask task = new ScanFrameTask(frameScanButton, this, forward6, resultFrameScan, java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.end"), titleStep6);
            task.execute();
    }
    private void resetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetActionPerformed
        patientFilter=null;fillPatientResultTable();
        patientFilter = new PatientFilter();
        namePatient.setText(patientFilter.getName());
        surnamePatient.setText(patientFilter.getSurname());
        pack();
        repaint();
}//GEN-LAST:event_resetActionPerformed

    private void fillPatientResultTable(){
        List<Patient> patientList = guiAction.searchPatient(patientFilter);
        Container parent = patientResultTable.getParent();
        parent.remove(patientResultTable);
        patientResultTable = new it.allerj.gui.component.MyTable();
        String[] COLUMN_NAMES = JTableSupport.getPatientColumn();
        DefaultTableModel tableModel = JTableSupport.getNewTableModelForResults(COLUMN_NAMES);
        patientResultTable.setModel(tableModel);
        if(patientList==null | patientList.size()==0){
            noPatientResult.setText(CSS.rs.getString("i18n.no.patient.result"));
        } else {
            noPatientResult.setText("");
            //patientResultTable = null;
           
            TableSorter tableSorter = JTableSupport.getNewTableSorter(tableModel, patientResultTable);
            patientResultTable.setModel(tableSorter);
            JTableSupport.getNewResizer(tableModel, patientResultTable);
            System.out.println(""+patientPane.isEnabled());
            tableModel.setDataVector(JTableSupport.getPatientData(patientList, this, jTabbedPane.isEnabledAt(1)), COLUMN_NAMES);
            
        }
        JTableSupport.setSizeForIconButton(patientResultTable, 0);
        parent.add(patientResultTable);
        
    }
    private void searchPatientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchPatientActionPerformed
        fillPatientResultTable();
}//GEN-LAST:event_searchPatientActionPerformed

    private void back7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_back7ActionPerformed
        patientPane.remove(editPatient);
        fillPatientResultTable();
        cleanModel();
        patientPane.add(searchPatientPanel);
        searchPatientPanel.repaint();
        repaint();
        pack();
    }//GEN-LAST:event_back7ActionPerformed

    private void forward2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_forward2ActionPerformed
        step2ToStep3();
    }//GEN-LAST:event_forward2ActionPerformed

    private void forward2MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_forward2MouseReleased
        step2ToStep3();
    }//GEN-LAST:event_forward2MouseReleased

    private void back2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_back2ActionPerformed
        analysisPane.remove(analysisStep2);
        analysisPane.add(analysisStep1);
        jTabbedPane.setEnabledAt(1, true);
        jTabbedPane.setEnabledAt(2, true);
        repaint();
        pack();
    }//GEN-LAST:event_back2ActionPerformed

    private void reset1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_reset1ActionPerformed
        // TODO add your handling code here:
        resultPane.remove(searchResultPanel);
        resultPane.add(showResultPanel);
        repaint();
        pack();
    }//GEN-LAST:event_reset1ActionPerformed

    private void fillFrameResultTable(){
        List<AllergicTest> allergicTestList = guiAction.searchAllergicTest(allergicTestFilter);
        Container parent = resultTable.getParent();
        parent.remove(resultTable);
        resultTable = new it.allerj.gui.component.MyTable();
        String[] COLUMN_NAMES = JTableSupport.getResultColumn();
        DefaultTableModel tableModel = JTableSupport.getNewTableModelForResults(COLUMN_NAMES);
        resultTable.setModel(tableModel);
        if(allergicTestList==null | allergicTestList.size()==0){
            noResult.setText(CSS.rs.getString("i18n.no.result.at"));
        } else {
            noResult.setText("");
            //patientResultTable = null;
            
            TableSorter tableSorter = JTableSupport.getNewTableSorter(tableModel, resultTable);
            resultTable.setModel(tableSorter);
            JTableSupport.getNewResizer(tableModel, resultTable);
            Object[][] values = JTableSupport.getResultData(allergicTestList, this);
            tableModel.setDataVector(values, COLUMN_NAMES);
            
        }
        JTableSupport.setSizeForIconButton(resultTable, 0);
        parent.add(resultTable);
        
    }
    private void searchFrameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchFrameActionPerformed
        fillFrameResultTable();
}//GEN-LAST:event_searchFrameActionPerformed

    private void jTabbedPaneMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTabbedPaneMousePressed
        if(evt.getComponent() instanceof JTabbedPane){
            JTabbedPane tabPane = (JTabbedPane)evt.getComponent();
                if(tabPane.getSelectedIndex()==2){
                GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
                gridBagConstraints.gridx = 0;
                gridBagConstraints.gridy = 2;
                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
                gridBagConstraints.weightx = 1.0;
                gridBagConstraints.weighty = 1.0;
                searchResultPanel.add(dataTablePanel1, gridBagConstraints);
                repaint();
                pack();
            }
        }
    }//GEN-LAST:event_jTabbedPaneMousePressed

    private void deletePatientMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deletePatientMouseReleased
        // TODO add your handling code here:
}//GEN-LAST:event_deletePatientMouseReleased

    private void deletePatientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deletePatientActionPerformed
        int n = JOptionPane.showOptionDialog(
                this,
                java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.delete.patient"),
                java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.Confirm"),
                JOptionPane.YES_NO_OPTION,
                JOptionPane.QUESTION_MESSAGE,
                null,     //do not use a custom Icon
                defaultOptions,  //the titles of buttons
                defaultOptions[0]);
        if(n==0){
            guiAction.deletePersistendeObject(modelPatient);
            back7ActionPerformed(evt);
        }
}//GEN-LAST:event_deletePatientActionPerformed

    private void back8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_back8ActionPerformed
        resultPane.remove(showResultPanel);
        resultPane.add(searchResultPanel);
        repaint();
        pack();
    }//GEN-LAST:event_back8ActionPerformed

    private void deletePatient1MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deletePatient1MouseReleased
        // TODO add your handling code here:
    }//GEN-LAST:event_deletePatient1MouseReleased

    private void deletePatient1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deletePatient1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_deletePatient1ActionPerformed

    private void savePatientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_savePatientActionPerformed
        if(!namePatient.isValidText() || !surnamePatient.isValidText()){
            
            mandatoryRequirements.setErrorMessage(java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.complete.mandatory.requirements"));
            mandatoryRequirements.setVisible(true);
        } else {
            if((!emailPatient.isValidText() && emailPatient.getText().trim().length()!=0) || (birthdatePatient.getDate()==null && ((JTextFieldDateEditor)birthdatePatient.getDateEditor()).getText()!=null && ((JTextFieldDateEditor)birthdatePatient.getDateEditor()).getText().trim().length()>0)){
                mandatoryRequirements.setErrorMessage(java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.resolve.problems.in.form"));
                mandatoryRequirements.setVisible(true);
                return;
            }
            mandatoryRequirements.setVisible(false);
            bindingToPatient();
            
            guiAction.savePersistenceObject(modelPatient);
            
            repaint();
            pack();
        }
    }//GEN-LAST:event_savePatientActionPerformed

    private void savePatientMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_savePatientMouseReleased
        // TODO add your handling code here:
    }//GEN-LAST:event_savePatientMouseReleased

    private void back9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_back9ActionPerformed
        analysisPane.remove(analysisStep2);
        analysisPane.add(analysisStep1);
        repaint();
        pack();
    }//GEN-LAST:event_back9ActionPerformed
    private void chooseIfEnableForward2(){
        if(namePatient.isValidText() && surnamePatient.isValidText()){
            forward2.setEnabled(true);
        } else {
            forward2.setEnabled(false);
        }
    }
    private void step2ToStep3(){
        if(!namePatient.isValidText() || !surnamePatient.isValidText()){
            chooseIfEnableForward2();
            mandatoryRequirements.setErrorMessage(java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.complete.mandatory.requirements"));
            mandatoryRequirements.setVisible(true);
        } else {
            
            if((!emailPatient.isValidText() && emailPatient.getText().trim().length()!=0) || (birthdatePatient.getDate()==null && ((JTextFieldDateEditor)birthdatePatient.getDateEditor()).getText()!=null && ((JTextFieldDateEditor)birthdatePatient.getDateEditor()).getText().trim().length()>0)){
                mandatoryRequirements.setErrorMessage(java.util.ResourceBundle.getBundle("it/allerj/bundle/allerj").getString("i18n.resolve.problems.in.form"));
                mandatoryRequirements.setVisible(true);
                return;
            }
            mandatoryRequirements.setVisible(false);    
            bindingToPatient();
            analysisPane.remove(analysisStep2);
            analysisPane.add(analysisStep3);
            repaint();
            pack();  
        }    
    }
    
    private int getNumberFrame(){
       
        return numberFrame;
    }
    public void setNumberFrame(int i){
        numberFrame = i;
    }
    public void resetView(){
        resetForms();
        analysisPane.remove(analysisStep6);
        analysisPane.add(welcomeAnalysis);
        jTabbedPane.setEnabledAt(1, true);
        jTabbedPane.setEnabledAt(2, true);
    }
    private void resetForms(){
        analysisStep2 = null;
        allergicTest = null;
        setImage(null);
        contentPane.removeAll();
        System.gc();
        initComponents();
        back9.setVisible(false);
        radioSelectPatient.setEnabled(guiAction.getPersistenceObjectList(Patient.class).size()!=0);
    }
    public AllergicTest getAllergicTest(){
        return this.allergicTest;
    }
    public void setAllergicTest(AllergicTest allergicTest){
        this.allergicTest = allergicTest;
    }
   
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainJFrame().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel allerJTitle;
    private it.allerj.bean.AllergicTestFilter allergicTestFilter;
    public javax.swing.JPanel analysisPane;
    private javax.swing.JPanel analysisStep1;
    private javax.swing.JPanel analysisStep1Body;
    private javax.swing.JPanel analysisStep1Head;
    public javax.swing.JPanel analysisStep2Body;
    private javax.swing.JPanel analysisStep2Form;
    private javax.swing.JPanel analysisStep2Head;
    private javax.swing.JPanel analysisStep2Head1;
    private javax.swing.JPanel analysisStep2Head2;
    private javax.swing.JPanel analysisStep2InsertPatient;
    public javax.swing.JPanel analysisStep3;
    private javax.swing.JPanel analysisStep3Body;
    private javax.swing.JPanel analysisStep3Head;
    private javax.swing.JPanel analysisStep4;
    private javax.swing.JPanel analysisStep4Body;
    private javax.swing.JPanel analysisStep4Head;
    private javax.swing.JPanel analysisStep5;
    private javax.swing.JPanel analysisStep5Body;
    private javax.swing.JPanel analysisStep5Head;
    private javax.swing.JPanel analysisStep6;
    private javax.swing.JPanel analysisStep6Body;
    private javax.swing.JPanel analysisStep6Head;
    private javax.swing.JButton back1;
    private javax.swing.JButton back2;
    private javax.swing.JButton back3;
    private javax.swing.JButton back4;
    private javax.swing.JButton back5;
    private javax.swing.JButton back6;
    private javax.swing.JButton back7;
    private javax.swing.JButton back8;
    private javax.swing.JButton back9;
    private javax.swing.JTextField barCodeReagentSearch;
    private javax.swing.JLabel barCodeReagentSearchLabel;
    private javax.swing.JLabel barcodeATlabel;
    private com.toedter.calendar.JDateChooser birthdatePatient;
    private javax.swing.JLabel birthdatePatientLabel;
    private javax.swing.ButtonGroup buttonGroupSelectAnalysisType;
    private javax.swing.ButtonGroup buttonGroupSelectPatient;
    private javax.swing.ButtonGroup buttonGroupSexPatient;
    private javax.swing.JPanel contentPane;
    private javax.swing.JLabel dataATLabel;
    private javax.swing.JPanel dataTablePanel;
    public javax.swing.JPanel dataTablePanel1;
    private javax.swing.JLabel decisionStep1;
    private javax.swing.JLabel decisionStep3;
    private javax.swing.JButton deletePatient;
    private javax.swing.JButton deletePatient1;
    private javax.swing.JLabel descriptionLabelScanFrame1;
    private javax.swing.JLabel descriptionLabelScanFrame2;
    private javax.swing.JPanel descriptionPanel;
    private javax.swing.JPanel detailPatient;
    private javax.swing.JCheckBox doubleFrameCheck;
    public javax.swing.JPanel editPatient;
    private it.allerj.gui.component.EmailOnly emailPatient;
    private javax.swing.JLabel emailPatientLabel;
    private javax.swing.JPanel errorPane;
    private javax.swing.JButton exit;
    private javax.swing.JRadioButton femaleRadioButton;
    private javax.swing.JPanel filterPanel;
    private javax.swing.JPanel filterResultPanel;
    private javax.swing.JPanel footerPane;
    private javax.swing.JButton forward;
    private javax.swing.JButton forward1;
    private javax.swing.JButton forward2;
    private javax.swing.JButton forward3;
    private javax.swing.JButton forward4;
    public javax.swing.JButton forward5;
    public javax.swing.JButton forward6;
    private javax.swing.JLabel frame1Barcode;
    private javax.swing.JLabel frame2Barcode;
    private javax.swing.JButton frameScanButton;
    private com.toedter.calendar.JDateChooser fromDate;
    private javax.swing.JLabel fromDateLabel;
    private javax.swing.JPanel headPanel;
    private javax.swing.JPanel innerButtonBar;
    private javax.swing.JPanel innerButtonBar1;
    private javax.swing.JPanel innerButtonBar10;
    private javax.swing.JPanel innerButtonBar2;
    private javax.swing.JPanel innerButtonBar3;
    private javax.swing.JPanel innerButtonBar4;
    private javax.swing.JPanel innerButtonBar5;
    private javax.swing.JPanel innerButtonBar6;
    private javax.swing.JPanel innerButtonBar7;
    private javax.swing.JPanel innerButtonBar8;
    private javax.swing.JPanel innerButtonBar9;
    public javax.swing.JPanel innerEditPatient;
    public javax.swing.JPanel innerShowResult;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JSeparator jSeparator;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator10;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JSeparator jSeparator8;
    private javax.swing.JSeparator jSeparator9;
    private javax.swing.JTabbedPane jTabbedPane;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JRadioButton maleRadioButton;
    private com.openoak.textfield.MessageLabel mandatoryRequirements;
    private com.openoak.textfield.MessageLabel messageLabelEmail;
    private com.openoak.textfield.MessageLabel messageLabelMobile;
    private com.openoak.textfield.MessageLabel messageLabelName;
    private com.openoak.textfield.MessageLabel messageLabelSurname;
    private com.openoak.textfield.MessageLabel messageLabelTel;
    private javax.swing.JLabel mobLabel;
    private it.allerj.gui.component.NumberOnly mobilePatient;
    private javax.swing.JLabel mobilePatientLabel;
    private it.allerj.model.AllergicTest modelAllergicTest;
    private it.allerj.model.Patient modelPatient;
    private it.allerj.gui.component.TextOnly namePatient;
    private javax.swing.JLabel namePatientLabel;
    private javax.swing.JTextField namePatientSearch;
    private javax.swing.JLabel namePatientSearchLabel;
    private javax.swing.JLabel noPatientResult;
    public javax.swing.JLabel noResult;
    private javax.swing.JLabel outBarcodeAT;
    private javax.swing.JLabel outBithdatePatient;
    private javax.swing.JLabel outDataAT;
    private javax.swing.JLabel outEmailPatient;
    private javax.swing.JLabel outMobilePatient;
    private javax.swing.JLabel outNamePatient;
    private javax.swing.JLabel outSurnamePatient;
    private javax.swing.JLabel outTelephonePatient;
    private it.allerj.bean.PatientFilter patientFilter;
    private javax.swing.JLabel patientLabel;
    public javax.swing.JPanel patientPane;
    private it.allerj.gui.component.MyTable patientResultTable;
    private javax.swing.JLabel putHereImage;
    private javax.swing.JRadioButton radioDoubleFrame;
    private javax.swing.JRadioButton radioInsertPatient;
    private javax.swing.JRadioButton radioSelectPatient;
    private javax.swing.JRadioButton radioSingleFrame;
    private javax.swing.JButton reset;
    private javax.swing.JButton reset1;
    public javax.swing.JLabel resultFrameBarcodeScan;
    public javax.swing.JLabel resultFrameScan;
    public javax.swing.JPanel resultPane;
    private javax.swing.JLabel resultReagentScan;
    private it.allerj.gui.component.MyTable resultTable;
    private javax.swing.JButton savePatient;
    private javax.swing.JPanel searchBodyPanel;
    private javax.swing.JPanel searchBodyPanel1;
    private javax.swing.JButton searchFrame;
    private javax.swing.JPanel searchPanel;
    private javax.swing.JButton searchPatient;
    public javax.swing.JPanel searchPatientPanel;
    private javax.swing.JLabel searchPatientPanelLabel;
    private javax.swing.JPanel searchResult;
    public javax.swing.JPanel searchResultPanel;
    private javax.swing.JLabel searchResultPanelLabel;
    private javax.swing.JPanel sexPanel;
    private javax.swing.JLabel sexPatientLabel;
    public javax.swing.JPanel showResultPanel;
    private javax.swing.JCheckBox singleFrameCheck;
    private javax.swing.JLabel singleFrameLabel;
    private javax.swing.JPanel spacer;
    private javax.swing.JPanel spacer1;
    private javax.swing.JPanel spacer3;
    private javax.swing.JPanel spacer4;
    private javax.swing.JPanel spacer5;
    private javax.swing.JPanel spacer6;
    private javax.swing.JPanel spacer7;
    private javax.swing.JPanel spacer8;
    private it.allerj.gui.component.TextOnly surnamePatient;
    private javax.swing.JLabel surnamePatientLabel;
    private javax.swing.JTextField surnamePatientSearch;
    private javax.swing.JLabel surnamePatientSearchLabel;
    private javax.swing.JLabel telLabel;
    private it.allerj.gui.component.NumberOnly telPatient;
    private javax.swing.JLabel telPatientLabel;
    private javax.swing.JLabel titleStep1;
    private javax.swing.JLabel titleStep3;
    private javax.swing.JLabel titleStep32;
    private javax.swing.JLabel titleStep33;
    private javax.swing.JLabel titleStep34;
    private javax.swing.JLabel titleStep4;
    private javax.swing.JLabel titleStep5;
    private javax.swing.JLabel titleStep6;
    private javax.swing.JLabel titleWelcome;
    private com.toedter.calendar.JDateChooser toDate;
    private javax.swing.JLabel toDateLabel;
    private javax.swing.JPanel typeFrame;
    private javax.swing.JPanel welcomeAnalysis;
    private javax.swing.JPanel welcomeBody;
    private javax.swing.JPanel welcomeHead;
    private javax.swing.JPanel wizardButtonBar;
    private javax.swing.JPanel wizardButtonBar1;
    private javax.swing.JPanel wizardButtonBar10;
    private javax.swing.JPanel wizardButtonBar2;
    private javax.swing.JPanel wizardButtonBar3;
    private javax.swing.JPanel wizardButtonBar4;
    private javax.swing.JPanel wizardButtonBar5;
    private javax.swing.JPanel wizardButtonBar6;
    private javax.swing.JPanel wizardButtonBar7;
    private javax.swing.JPanel wizardButtonBar8;
    private javax.swing.JPanel wizardButtonBar9;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

    public BufferedImage getImage() {
        return image;
    }

    public void setImage(BufferedImage image) {
        this.image = image;
    }

    public it.allerj.model.Patient getModel() {
        return modelPatient;
    }

    public void setModel(it.allerj.model.Patient model) {
        this.modelPatient = model;
    }

    public BufferedImage getImage2() {
        return image2;
    }

    public void setImage2(BufferedImage image2) {
        this.image2 = image2;
    }
    
}
